package com.huixuebao.api.service.rpc;

import com.huixuebao.common.bean.ApiResult;
import com.huixuebao.payinterface.dto.PayDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "pay")
public interface WxPayService {

    @GetMapping("/wxPay/getUserCode")
    ApiResult getUserCode(@RequestParam String code);

    @PostMapping("/wxPay/createOrder")
    ApiResult createOrder(@RequestBody PayDTO payDTO);

    /**
     * 微信回调接口
     * @param xmlDate
     * @return
     */
    @RequestMapping("/wxPay/notify")
    String notify(@RequestBody String xmlDate);

    /**
     * 更新订单
     * @param payDTO
     * @return
     */
    @PostMapping("/wxPay/updateOrder")
    ApiResult updateOrder(@RequestBody PayDTO payDTO);

    /**
     * 获取理赔详情
     * @param policyId
     * @return
     */
    @GetMapping("/wxPay/getSettleDetails")
    ApiResult settleDetails(@RequestParam String policyId);
}
